import 'package:animal/constant/color.dart';
import 'package:animal/constant/font.dart';
import 'package:animal/item/set_menu_item.dart';
import 'package:animal/utils/screen_util.dart';
import 'package:animal/widgets/appbar_widget.dart';
import 'package:flutter/material.dart';
import 'package:getwidget/getwidget.dart';

///我的——设置
class MineSetPage extends StatelessWidget {
  const MineSetPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: KColorConstant.appBgColor,
      appBar: AppBarWidget.defaultAppBar(
        title: const Text("设置"),
        backgroundColor: Colors.white,
        elevation: 1,
      ),
      body: Column(
        children: [
          Container(
            color: Colors.white,
            padding: EdgeInsets.only(left: ScreenUtil().L(20)),
            child: Column(
              children: [
                SetMenuItem(
                  text: "个人信息",
                ),
                SetMenuItem(
                  text: "账号认证",
                ),
                SetMenuItem(
                  text: "安全设置",
                ),
              ],
            ),
          ),
          Container(
            color: Colors.white,
            margin: EdgeInsets.only(top: ScreenUtil().L(20)),
            padding: EdgeInsets.only(left: ScreenUtil().L(20)),
            child: Column(
              children: [
                SetMenuItem(
                  text: "消息通知",
                ),
                SetMenuItem(
                  text: "隐私设置",
                ),
                SetMenuItem(
                  text: "通用设置",
                ),
              ],
            ),
          ),
          Container(
            color: Colors.white,
            margin: EdgeInsets.only(top: ScreenUtil().L(20)),
            padding: EdgeInsets.only(left: ScreenUtil().L(20)),
            child: Column(
              children: [
                SetMenuItem(
                  text: "清理缓存",
                ),
                SetMenuItem(
                  text: "关于我们",
                ),
              ],
            ),
          ),
          Expanded(
            child: Container(
                margin: EdgeInsets.symmetric(horizontal: ScreenUtil().L(50)),
                alignment: Alignment.center,
                child: GFButton(
                  onPressed: () {},
                  text: "退出登录",
                  textStyle: KFontConstant.myTextStyle(size: 20),
                  color: Colors.white,
                  fullWidthButton: true,
                  size: ScreenUtil().L(40),
                )),
          )
        ],
      ),
    );
  }
}
